<template>
  <div style="display: none"></div>
</template>
<script>
export default {
  methods:{
    confirm(data,callback){
      if (!!data.arrt.streamEncryption){
        let aesKey="";
        this.$Modal.confirm({
          render: (h) => {
            return h('Input', {
              props: {
                value: aesKey,
                autofocus: true,
                placeholder: this.$t('enter_aes_password')
              },
              on: {
                input: (val) => {
                  aesKey = val;
                }
              }
            })
          },
          onOk: () => {
            if (aesKey != data.arrt.streamEncryption){
              this.$Message.error(this.$t("msg_120008")) //密码错误
              return;
            }else{
              if (!!callback){
                callback(data);
              }
            }
          },
          onCancel: () => {
            return;
          }
        })
      }else{
        if (!!callback){
          callback(data);
        }
      }
    }
  }
}
</script>
